import VueRouter from 'vue-router'

import FindContainer from '../components/find/FindContainer.vue'
import HomeContainer from '../components/home/HomeContainer.vue'
import ListItemContainer from '../components/listItem/ListItemContainer.vue'
import ShopCarContainer from '../components/shopCar/ShopCarContainer.vue'
import UserContainer from '../components/user/UserContainer.vue'
import Register from '../components/register/Register.vue'
import Login from  '../components/login/Login.vue'
import GoodsChildren from '../components/listItem/GoodsChildren.vue'
import GoodDetails from '../components/goodsDetails/GoodDetails.vue'

let router = new VueRouter({
    routes: [
        {path:'/',redirect:"/home"},
        {path:'/home',component:HomeContainer},
        {path:'/listItem',component:ListItemContainer,children:[{path:"listGoodsInfo/:id",component:GoodsChildren}]},
        {path:'/find',component:FindContainer},
        {path:'/shopCar',component:ShopCarContainer},
        {path:'/user',component:UserContainer},
        {path:'/register',component:Register},
        {path:'/login',component:Login},
        {path:'/goodsdetails/:id',component:GoodDetails}
    ],

})


export default router